package com.shopx.auth.dao.db1;


import com.shopx.auth.bean.SysUserRole;
import com.shopx.auth.model.SysUserRoleModel;
import com.shopx.dal.mysql.SqlMapper;

import java.util.List;

@SqlMapper
public interface SysUserRoleDao {
  int insertSelective(SysUserRole sysUserRole);

  int updateByPrimaryKeySelective(SysUserRole sysUserRole);

  int deleteByPrimaryKey(SysUserRole sysUserRole);

  int deleteByRoleCode(SysUserRole sysUserRole);

  /***
   * @description:根据用户编号删除记录
   *
   * @param sysUserRole
   * @author:lituo
   * @date:2021-01-08 5:00 PM
   * @return:int
   */
  int deleteByUserId(SysUserRole sysUserRole);

  SysUserRoleModel selectByPrimaryKey(SysUserRole sysUserRole);

  int selectCount(SysUserRoleModel sysUserRole);

  List<SysUserRoleModel> selectList(SysUserRoleModel sysUserRole);

  /**
   * @param list
   * @description:批量插入记录信息
   * @author:lituo
   * @date:2021-01-08 3:03 PM
   * @return:int
   */
  int insertBatch(List<SysUserRole> list);

  /**
   * 根据用户编号查询用户角色
   * @param sysUserRole
   * @return
   */
  List<SysUserRoleModel> selectRoleByUserId(SysUserRole sysUserRole);
}

